package com.health.system.vo;

import com.health.system.common.validated.groups.InsertGroup;
import com.health.system.common.validated.groups.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author 黄叶
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("资源新增实体类")
public class ResourceVo {
    @NotNull(message = "资源id不能为空", groups = {UpdateGroup.class})
    @ApiModelProperty("资源id")
    private Long id;

    @NotNull(message = "父级资源id不能为空", groups = InsertGroup.class)
    @ApiModelProperty("父级资源id")
    private Long parentId;

    @NotBlank(message = "资源名称不能为空")
    @ApiModelProperty("资源名称")
    private String name;

    @ApiModelProperty("请求路径")
    private String url;

    @ApiModelProperty("请求方式")
    private String requestMethod;
}
